<template>
  <el-date-picker    
         :value-format="format"
         :format="format"
          :editable=false  @change="onchange"  v-model="date" >

  </el-date-picker>
</template>
<script>
  export default {
    props:['value','format'],
    data(){
      return {
        date:null,
      }
    },
    created(){
      this.date = this.value;
    },
    methods:{
      onchange(value){
          
          console.log("select "+value)
          this.data = value
          this.$emit('input',value)
      }
    },
  }
</script>
